

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class BgLayout extends StatelessWidget {
  
  Widget child;
  Widget? appBar;

  BgLayout(this.child, {this.appBar});
  
  @override
  Widget build(BuildContext context) {
    Widget bg = Container(

      height: 272,
      decoration: new BoxDecoration(
        gradient: new LinearGradient(
            colors: [
              const Color(0xFFFFF5F6),
              const Color(0xFFFFFFFF),
            ],
            begin: const FractionalOffset(0.0, 0.0),
            end: const FractionalOffset(0.0, 1.0),
            stops: [0.0, 1.0],
            tileMode: TileMode.clamp),
      ),
    );
    return ColoredBox(color: Colors.white, child: Stack(
      children: [
        bg,
        child
      ],
    ));
  }
  
}